/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package deatax.display.particle;

/**
 *
 * @author nrechten
 */
public abstract class ParticleRule {

    public static int RULE_VECTOR = 0;
    public static int RULE_ALPHA = 1;
    public static int RULE_ROTATION = 2;
    public static int RULE_SCALE = 3;

    public static int[] RULE_SIZE = new int[]{ 1, 1, 1, 1};

    public static int LINEAR = 0;

    float   max;
    float   min;
    float   derivative;
    int     changeModel = LINEAR;
    int     type;
    boolean shared = false;

    public abstract void apply(float[] f, int index, int index_r, float scale, float[] p, float age);
    public abstract void init(float[] f, int index);

    public int spaceRequirement(){
        return RULE_SIZE[type];
    }
}
